package client;

import interfaces.*;
import client.*;
import serveur.*;
import java.rmi.*;
import java.util.*;
import java.lang.*;
import java.rmi.server.UnicastRemoteObject;
import java.io.*;

public class VideoSendThread extends Thread implements VideoSendThreadITF, Runnable
{
	ClientITF elu;
	String ip;
	String port;
	
	public VideoSendThread(ClientITF _elu, String _ip, String _port) throws RemoteException
	{
		elu = _elu;
		ip  = _ip;
		port = _port;
	}

	public void run()
	{
		try
		{
			System.out.println("-> Envoi de la vidéo");
			send_video();
		}
		catch (RemoteException e) { System.out.println(e); }
	}
	
	// Méthode de lancement d'envoi de vidéo
	public void send_video() throws RemoteException
	{
		elu.videoSend(ip, port);
	}
}
